import React, { Component } from 'react';
import '../../styles/MyHeader.css'
import '../../font/iconfont.css'
import { withRouter } from 'react-router-dom';
class MyHeader extends Component {
    gosearch(){
        this.props.history.push('/search')
    }
    render() {
        return (
            <div className='myHeader'>
                <div className="ipt">
                    <i className='iconfont icon-sousuo1'></i>
                    <input type="text" placeholder='搜索商品' onFocus={()=>{this.gosearch()}}/>
                </div>
                 <span><i className='iconfont icon-kefu'></i>客服</span>
            </div>
        );
    }
}

export default withRouter(MyHeader);

